package org.jeecg.modules.teacourse.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.course.entity.AstuCourse;
import org.jeecg.modules.teacher.entity.AstuTeacher;
import org.jeecg.modules.teacher_course.entity.AstuTeacherCourse;
import org.jeecg.modules.teacourse.entity.AstuTeacourse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 教师查看自己的课程表
 * @Author: jeecg-boot
 * @Date:   2021-10-08
 * @Version: V1.0
 */
public interface AstuTeacourseMapper extends BaseMapper<AstuTeacourse> {

    //通过课程名称在课程表  查询课程id
    @Select("select * from astu_course WHERE course_name=#{courseName}")
    AstuCourse selectCourseIdByCourseName(@Param("courseName") String courseName);

    //通过课程id 在老师课程表中   查询 老师id
    @Select("select * from astu_teacher_course WHERE teacher_id=#{teacherId}")
    AstuTeacherCourse selectTeacherIdByCourseId(@Param("teacherId") String teacherId);

    //通过教师工号  在老师表中查询 所有信息
    @Select("select * from astu_teacher WHERE teacher_number=#{teacherNumber}")
    AstuTeacher selectTeacherByTeacherNumber(@Param("teacherNumber") String teacherNumber);

}
